<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<style type="text/css">
	.zoneSelect {
	width: 180px;
	}

	#batteryCorrelation_packNum {
		display: inline-block;
		color: green;
		font-weight: bold;
		font-size: 20px;
		font-style: normal;
	}

	#batteryCorrelation_custom {
	    display: inline-block;
		white-space:nowrap;
		overflow:hidden;
		text-overflow:ellipsis;
	}
</style>
<link rel="stylesheet" href="script/multiSelect/css/multi-select-metro.css" />
<div class="container-fluid">
	<div class="row-fluid">
		<div class="span12">
			<ul class="breadcrumb">
				<li><span class="c-999">客户管理<i
					class="icon-angle-right"></i>
				</li>
				<li><a class="c-666" onclick="util.showContent('pages/basic/customerMng.jsp')">客户信息管理</a></li>
			</ul>
		</div>
	</div>

	<div class="search-box">
		<div class="search-title">
			<span class="search-criteria c-666">&nbsp;查询条件</span>
		</div>
		<form id="customer_search_form">
			<table class="search-body" border="0" cellpadding="0" cellspacing="0" width="100%">
				<tr>
					<td>
					    <label class="my-label">客户编码:</label><input
						id="id_cusCode" class="my-input" type="text" />
						
						<label class="my-label">客户名称:</label><input
						id="id_cusName" class="my-input" type="text" />
						
						<label class="my-label">状态:</label>
						<select id="id_cusStatus" class="my-select">
						<option value="">全部</option>
						</select>
					</td>
				</tr>
			</table>
		</form>
		<ul class="search-button">
			<li><button class="btn blue" id="btn_query">查&nbsp;&nbsp;询</button></li>
			<li><button class="btn blue" id="btn_reset">重&nbsp;&nbsp;置</button></li>
		</ul>
	</div>
	<div class="table-con">
		<div class="table-head">
			&nbsp;&nbsp;&nbsp;<i class="icon-reorder"></i>&nbsp;列表详情
		</div>
		<div class="list-body">
			<div class="portlet-body">
				<p>
					<button type="button" class="btn blue hide" id="customer_table_add" data-toggle="modal">新&nbsp;&nbsp;增</button>
					<button id="customer_table_edit" class="btn green hide" data-toggle="modal">
							编&nbsp;&nbsp;辑
					</button>
					<button id="customer_table_del" class="btn red hide">
							删&nbsp;&nbsp;除
					</button>
					<button type="button" class="btn blue " data-toggle="modal" id="batteryCorrelation">电池关联管理</button>
				</p>
			</div>
			<div class="table-responsive">
				<table class="table table-striped table-hover table-bordered"
					id="customer_table">
					<thead>
						<tr>
							<th class="sorting_asc_disabled" style="width:8px;"><input
								type="checkbox" class="group-checkable"
								data-set="#customer_table .checkboxes" />
							</th>
							<th class="fourMinWidth">客户编码</th>
							<th class="fourMinWidth">上级单位</th>
							<th class="fourMinWidth">客户名称</th>
							<th class="fourMinWidth">客户简称</th>
							<th class="fourMinWidth">所属市地</th>
							<th class="fourMinWidth">所属省份</th>
							<th class="fourMinWidth">重要级别</th>
							<th class="twoMinWidth">类型</th>
							<th class="twoMinWidth">状态</th>
							<th class="hidden">地址</th>
							<th class="hidden">邮编</th>
						</tr>
					</thead>
					<tbody>
					</tbody>
				</table>
			</div>
		</div>
	</div>

	<!--新增客户-->
	<div id="add-customer" class="modal hide fade" tabindex="-1" data-focus-on="input:first">
		<div class="modal-header add-customer-header bg-green c-bold c-fff">
			<span id="customer_add_title"></span>
		</div>
		<div class="modal-body add-customer-body">
			<form action="" id="customer_form">
				<input type="hidden" id="company_id" name="pkId"> 
				<table class="table">
					<tr>
						<td>
							<span class="al-right"><i class="c-red">*&nbsp;</i>客户编码：</span><input type="text" id="cusCode" name="cusCode" maxlength="20"/>
						</td>
						<td><span class="al-right"><i class="c-red">*&nbsp;</i>客户名称：</span><input type="text" id="cusName" name="cusName" maxlength="300"/></td>
					</tr>
					<tr>
						<td><span class="al-right"><i class="c-red">*&nbsp;</i>客户简称：</span><input type="text" id="shortName" name="shortName" maxlength="85"/></td>
						<td>
							<span class="al-right"><i class="c-red">*&nbsp;</i>重要级别：</span>
							<select id="impLevel" name="impLevel">
							</select>
						</td>
					</tr>
					<tr>
						<td>
							<span class="al-right">上级单位：</span>
							<select id="parent_custom"  name="parent_custom" style="overflow: hidden; text-overflow:ellipsis; white-space: nowrap;">
							</select>
						</td>
						<td>
							<span class="al-right"><i class="c-red">*&nbsp;</i>类型：</span>
							<select id="type"  name="type">
							</select>
						</td>
											
					</tr>
					<tr>
						<td>
							<span class="al-right">&nbsp;&nbsp;状态：</span>
							<select id="status">
							</select>
						</td>
						<td>
							<span class="al-right">&nbsp;公司性质：</span>
							<select id="companyNature">
							</select>
						</td>
						
					</tr>
					<tr>
						<td>
							<span class="al-right">&nbsp;所属行业：</span>
							<select id="buss">
							</select>
						</td>
						<td><span class="al-right">&nbsp;</i>邮编：</span><input type="text" id='zipCode' maxlength="6" name="zipCode"/></td>
					</tr>
					
					<tr>
					<td colspan="2">
					       <div id="cityDiv">
							<span class="al-right"><i class="c-red">*&nbsp;</i>所属市地：</span>
								 <select class="prov zoneSelect" id="loc_province"></select>  
						         <select class="city zoneSelect" disabled="disabled" id="loc_city"></select>  
						         <select class="dist zoneSelect" disabled="disabled" id="county"></select>  
							</div>
						</td> 
					</tr>
					<tr>
						<td colspan="2"><span>&nbsp;详细地址：</span><input type="text" style="width: 576px;" id='address' maxlength="300"/></td>
					</tr>
					
				</table>
			</form>
		</div>
		<div class="modal-footer al-center bg-fff">
			<button type="button" data-dismiss="modal" class="btn green" style="margin-right: 25px;" id="form_company_save">保存</button>
			<button type="button" data-dismiss="modal" class="btn red" id="form_btn_close">取消</button>
		</div>
	</div>
	
	<!--查看详情 begin------------>
	<div id="addID-detail" class="modal hide fade" tabindex="-1" data-focus-on="input:first">
		<div class="modal-header add-customer-header bg-green c-bold c-fff">
			<button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
			客户信息详情
		</div>
		<div class="modal-body add-customer-body">
			<table class="table">
				<tr>
					<td><span class="al-right">客户编码：</span><span class="my-text" id="detail_cusCode"></span></td>
					<td><span class="al-right">客户名称：</span><span class="my-text" id="detail_cusName"></span></td>
				</tr>
				<tr>
					<td><span class="al-right">客户简称：</span><span class="my-text" id="detail_shortName"></span></td>
					<td><span class="al-right">重要级别：</span><span class="my-text" id="detail_impLevel"></span></td>
				</tr>
				<tr>
					<td><span class="al-right">上级单位：</span><span class="my-text" id="detail_parent_cus"></span></td>
					<td><span class="al-right">类型：</span><span class="my-text" id="detail_type"></span></td>
					
				</tr>
				<tr>
					<td><span class="al-right">状态：</span><span class="my-text" id="detail_status"></span></td>
					<td><span class="al-right">公司性质：</span><span class="my-text" id="detail_companyNature"></span></td>
					
				</tr>
				<tr>
					<td><span class="al-right">所属行业：</span><span class="my-text" id="detail_buss"></span></td>
					
					<td><span class="al-right">所属省份：</span><span class="my-text" id="detail_province"></span></td>
				</tr>
				<tr>

					<td><span class="al-right">所属市地：</span><span class="my-text" id="detail_city"></span></td>
					<td><span class="al-right">邮编：</span><span class="my-text" id="detail_zipCode"></span></td>
				</tr>
				<tr>
					<td colspan="2"><span class="al-right">详细地址：</span><span class="my-text-579" id="detail_address"></span></td>
				</tr>
				
								
			</table>
		</div>
	</div>

	<!--厂区电池管理------------>
	<div id="batteryID-correlation" class="modal hide fade" tabindex="-1" data-focus-on="input:first">
		<div class="modal-header add-customer-header bg-green c-bold c-fff">
			<button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
			厂区电池管理
		</div>
		<div class="modal-body">
			<input id="batteryCorrelation_pkId" value="" class="hide" />
			<!-- <div style="border: solid 1px green"><span class="my-span-70">客户：</span><span class="text-of my-span" id="batteryCorrelation_custom"></span></div>
			<div style="border: solid 1px green"><span class="my-span-70">已经关联的电池：</span><span class="text-of my-span" id="batteryCorrelation_packNum"></span>个</div> -->
			<table border="0" style="margin-bottom: 10px;">
				<tr>
					<td><span class="my-span-70">客户：</span></td>
					<td class="al-left"><span class="text-of my-span" id="batteryCorrelation_custom"></span></td>
				</tr>
				<tr>
					<td class="al-left" colspan="2" style="font-family: 宋体;color: #666;font-size: 14px;">已经关联的电池&nbsp;<span id="batteryCorrelation_packNum"></span>&nbsp;个</td>
				</tr>
			</table>
			<div class="portlet-body form">
				<form action="#" class="form-horizontal">
					<div class="control-group">
						<div class="controls" id="multiSelect_controls">
						</div>
					</div>
				</form>
			</div>

		</div>
		<div class="modal-footer al-center bg-fff">
			<button type="button" data-dismiss="modal" class="btn green" style="margin-right: 25px;" id="batteryCorrelation_save">确定</button>
			<button type="button" data-dismiss="modal" class="btn red" id="batteryCorrelation_close">取消</button>
		</div>
	</div>		
</div>		
<!--查看详情 end------------>	
<!-- 模态窗口 str -->
<jsp:include page="/pages/common/modal.jsp"></jsp:include>
<script type="text/javascript" src="script/multiSelect/js/jquery.multi-select.js"></script>
<script type="text/javascript" src="script/jquery/js/jquery.quicksearch.js"></script>
<script type="text/javascript" src="pages/basic/js/customerMng.js"></script>
<script type="text/javascript" src="script/jquery/js/jquery.cityselect.js"></script>
<script src="media/js/ui-modals.js"></script>
<script type="text/javascript">
	jQuery(document).ready(function() {
		customerTable.init();
		UIModals.init();
		
	});
</script>

